define(["jquery","underscore","backbone","../modules/c/indexC","../modules/c/admin","../modules/c/line-management", "../modules/c/noReport","../modules/m/hasReport","../modules/c/wirelessC",'../modules/c/linknetC','../modules/c/clientListC','../modules/c/dhcpC','../modules/c/netIpC','../modules/c/macC', "../modules/m/flowControlM" , "../modules/v/advanced-setting-v" , "../modules/m/date-setting-m" , "../modules/m/systemInfoM"],
    function($,_,Backbone,indexC,admin ,lineManagement,noReport ,hasReport,wirelessC,linknetC,clientListC,dhcpC,netIpC,macC,flowControl , advancedSettingV , dateSetting , systemInfoM) {
        function joins() {
            var route = Backbone.Router.extend({
                routes: {
                    //"":"index",
                    "&device=:arg1&statue=:arg2&shopName=:arg3&serUrl=:arg4&token=:arg5&DeviceID=:arg6&DeviceType=:arg7": "index",
                    // "search&a=:name&b=:aaa": "search"  // #search/kiwis
                    "admin": 'admin',
                    "line-management":"lineManagement",
                    "no-report":"noReport",
                    "has-report":"hasReport",
                    "mac":"mac",
                    "dhcp":"dhcp",
		                //流量控制
                    "flow-control": "flowControl",
                    //高级设置
                    "advanced-setting":"advancedSetting",
                    "date-setting":"dateSetting",
                    "system-info":"systemInfo",
                    "netip":"netip",
                    "clientlist":"clientlist",
                    "wireless&device=:arg1&statue=:arg2&shopName=:arg3&serUrl=:arg4&token=:arg5&DeviceID=:arg6&DeviceType=:arg7": 'wireless',
                    "linknet&device=:arg1&statue=:arg2&shopName=:arg3&serUrl=:arg4&token=:arg5&DeviceID=:arg6&DeviceType=:arg7": 'linknet',
                },
                index: function (arg1,arg2,arg3,arg4,arg5,arg6,arg7) {
                   indexC(arg1,arg2,arg3,arg4,arg5,arg6,arg7);
                },
                admin: function(){
                    //管理页面状态信息
                    admin();
                },
                lineManagement:function(){
                  lineManagement();
                },
                //未上报数据
                noReport(){
                  noReport();
                },
                //已上报数据
                hasReport(){
                  hasReport();
                },
                wireless: function(){
                    wirelessC();
                },
                linknet: function(arg1){
                    linknetC(arg1);
                },
                mac: function(){
                    macC();
                },
                dhcp:function(){
                    dhcpC();
                },
                netip:function(){
                    netIpC();
                },
                clientlist:function(){
                    clientListC();
                },
		//流量控制
                flowControl(){
                  flowControl();
                },
                //高级设置
                advancedSetting(){
                  advancedSettingV()
                },
                //时间设置
                dateSetting(){
                  dateSetting()
                },
                systemInfo(){
                  systemInfoM();
                }
            });

            var app_router=new route();

            Backbone.history.start();
            //清除定时器
            app_router.on('route', function (router) {
              if(window._time && router != 'lineManagement'){
                clearInterval(_time);
              };
            });
        }
        return joins;
    });
